<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page isELIgnored="false"%>
<%@ page import="Dao.usersDAO" %>
<%@ page import="JavaBean.Book" %>
<%@ page import="Dao.booksDAO" %>
<%@ page import="java.util.ArrayList" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<%
    request.setCharacterEncoding("utf-8");
    String id = request.getParameter("id");

    System.out.println(id);

    booksDAO dao = new booksDAO();
    //返回书籍的所有内容,包括内容
    Book book = dao.getAllBooksByID(id);
    request.setAttribute("book",book);

%>

<body>
<div style="text-align: center;">
    <h1>${book.name}</h1>
    <br>
    <p>${book.bookContent}</p>
</div>
</body>
</html>
